Basic Operations

This section covers the basic/simple operations that an application would need to be performed on an RFID Reader which includes Inventory and single tag access operations.

Simple Inventory (Continuous)

A simple continuous inventory operation would read all tags in the field of view of all antennas of the connected RFID Reader. It will use NO filters (pre-filters or post-filters) and the start and stop trigger for the inventory would be default, i.e. start immediately when rfid3.Actions.Inventory.Perform is called, and stop immediately when rfid3.Actions.Inventory.Stop is called.

// perform simple inventory

rfid3.Actions.Inventory.Perform();

// Keep getting tags in the ReadNotify event if registered

// stop the inventory

rfid3.Actions.Inventory.Stop();

Simple Access Operations - On Single Tag

Tag Access operations can be performed on a specific tag or can be applied on tags that match a specific Access-Filter. If no Access-filter is specified the Access Operation will be performed on all Tags in the field of view of chosen Antennas.

This section covers simple tag access operation on a specific tag which could be in the field of view of any of the antenna of the connected RFID Reader.

Read

The application can call method rfid3.Actions.TagAccess.ReadWait to read data from a specific memory bank.

// Read user memory bank for the given tag ID

string tagId = "1234ABCD00000000000025B1";

TagAccess.ReadAccessParams readParams = new TagAccess.ReadAccessParams();

TagData readAccessTag;

readParams.AccessPassword = 0;

readParams.ByteCount = 8;

readParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER;

readParams.ByteOffset = 0;

readAccessTag = rfid3.Actions.TagAccess.ReadWait(tagId, readParams, null);

Console.WriteLine(readAccessTag.MemoryBank.ToString() + " : " + readAccessTag.MemoryBankData);

Write, Block-Write

The application can call method rfid3.Actions.TagAccess.WriteWait or rfid3.Actions.TagAccess.BlockWriteWait to write data to a specific memory bank.

// Write user memory bank data

string tagId = "1234ABCD00000000000025B1";

TagAccess.WriteAccessParams writeParams = new TagAccess.WriteAccessParams();

byte[] writeData = new byte[4] {0x11, 0x22, 0x33, 0x44};

writeParams.AccessPassword = 0;

writeParams.WriteDataLength = writeData.Length;

writeParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER;

writeParams.ByteOffset = 0;

writeParams.WriteData = writeData;

// antenna Info is null – performs on all antenna

rfid3.Actions.TagAccess.WriteWait(tagId, writeAccessParams, null);

Lock

The application can call method rfid3.Actions.TagAccess.LockWait to perform lock operation on one or more memory banks with specific privileges.

// Lock the tag

string tagId = "1234ABCD00000000000025B1";

TagAccess.LockAccessParams lockAccessParams = new TagAccess.LockAccessParams();

/* lock now */

lockAccessParams.LockPrivilege[lockAccessParams.UserMemory] = LOCK_PRIVILEGE.LOCK_PRIVILEGE_READ_WRITE;

lockAccessParams.AccessPassword = 0;

rfid3.Actions.TagAccess.LockWait(tagId, lockAccessParams, null);

Kill

The application can call method rfid3.Actions.TagAccess.KillWait to kill a tag.

// Kill the tag

string tagId = "1234ABCD00000000000025B1";

TagAccess.KillAccessParams killAccessParams = new TagAccess.KillAccessParams();

killAccessParams.KillPassword = 0;

rfid3.Actions.TagAccess.KillWait(tagId, killAccessParams, null);

Block-Erase

The application can call RFID_BlockErase to erase the contents of a tag.

// Block Erase

string tagId = "1234ABCD00000000000025B1";

TagAccess.BlockEraseAccessParams blockEraseAccessParams = new TagAccess.BlockEraseAccessParams();

blockEraseAccessParams.AccessPassword = 0;

blockEraseAccessParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER; // user memory bank

blockEraseAccessParams.ByteOffset = 0;  // start erasing from offset 0

blockEraseAccessParams.ByteCount = 16; // number of bytes to erase

rfid3.Actions.TagAccess.BlockEraseWait(tagId, blockEraseAccessParams, null);

Block-Permalock

The application can call method rfid3.Actions.TagAccess.BlockPermalockWait to block  permalock a tag. Tags reported as part of Block-Permalock access operation will have TagData.OpCode as ACCESS_OPERATION_BLOCK_PERMALOCK, and TagData.OpStatus indicating the result of the operation; if TagData.OpStatus is ACCESS_SUCCESS, TagData.MemoryBankData will contain the Block-Permalock Mask Data.

// Kill the tag

string tagId = "1234ABCD00000000000025B1";

TagAccess.BlockPermalockAccessParams blockPermalockAccessParams = new TagAccess. BlockPermalockAccessParams ();

byte[] permalockMask = new byte[4] {0xF0, 0x00, 0x00, 0x00};

blockPermalockAccessParams.ReadLock = true;

blockPermalockAccessParams.MemoryBank = MEMORY_BANK_USER;

blockPermalockAccessParams.ByteOffset = 0;

blockPermalockAccessParams.ByteCount = 0;

blockPermalockAccessParams.Mask = permalockMask;

blockPermalockAccessParams.MaskLength= 4;

rfid3.Actions.TagAccess.BlockPermalockWait(tagId, blockPermalockAccessParams, null);

Recommission

The application can call method rfid3.Actions.TagAccess.RecommissionWait to enable a tag, containing information, to be reused.

// Kill the tag

string tagId = "1234ABCD00000000000025B1";

TagAccess.RecommissionAccessParams recommissionAccessParams = new TagAccess.RecommissionAccessParams();

recommissionAccessParams.KillPassword = 0xAAAAAAAA;

recommissionAccessParams.opCode = RECOMMISSION_OPERATION_CODE .RECOMMISSION_DISABLE_PERMALOCK;

rfid3.Actions.TagAccess.RecommissionWait(tagId, recommissionAccessParams, null);

Access Operations on specific memory field of Single Tag

The following functions assist in writing to specific memory fields of a specific Tag:

  1. WriteTagIDWait– This method writes to TagID of tag(s) and adjusts the PC bits according to the length of the TagID. When the TagID is modified, this API ensures that the Tag shall subsequently backscatter the modified EPC, for which it also writes the length of the new or updated (PC + EPC) into the first 5 bits of the Tag’s PC.
  2. WriteKillPasswordWait- This method writes the kill password of the tag(s).
  3. WriteAccessPasswordWait-- This method writes the access password of the tag(s).